from naoqi import ALProxy
import cv2 as cv
import numpy as np
import vision_definitions as vd

proxy=ALProxy("ALVisionDevice",IP,port)
videoClient=proxy.subscribe("python_client",2,ColorSpace=vd.kBGRColorSpace,fps=20)
proxy.getImageRemote(videoClient)
proxy.unsubscribe(videoClient)

frameArray=np.frombuffer(frame[6],dtype=np.uint8).reshape([frame[1],frame[0],frame[2])
cv.imwrite("<The path of the picture>",frameArray)
cv.imshow("current picture",frameArray)
cv.waitKey(0)
cv.destroyAllWindow()

